home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Startmenu Clear MRUs.xpl < prev    next >
Text File  |  2002-01-01  |  2KB  |  88 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="5"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\Start menu\Common"
  5. "NAME"="Clear Items #1"
  6. "VERSION"="1.43"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Clear "Run..." commands"
  9. "TEXT 2"="Clear found files ("Find" - "Files")"
  10. "TEXT 3"="Clear found computers ("Find" - "Computer")"
  11. "TEXT 4"="Clear "Recent Documents""
  12. "TEXT 5"="Clear all of the above"
  13. "DESCRIPTION 1"="Click an item to be cleared."
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"=" "
  18.  
  19.  
  20. 'Declaration of some constants
  21. sP1="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\"
  22. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Doc Find Spec MRU\"
  23. sP3="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FindComputerMRU\"
  24. sP4="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\"
  25. 'HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Prnportsmru" 'TODO... Some day... After Y2k
  26.  
  27. bShowMessage=true
  28.  
  29. 'Called when the Plugin is started
  30. Sub Plugin_Initialize
  31. End Sub
  32.  
  33. 'Called when the Plugin should validate the Data the user has entered
  34. Sub Plugin_CheckData(ElementIndex)
  35. End Sub
  36.  
  37. 'Called when the Plugin should apply the changes
  38. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  39.  Select Case ElementIndex
  40.  Case 1 'run
  41.  
  42.   i=RegEnumValues(sp1)
  43.   for l=1 to i
  44.    Call RegDeleteValue(sp1 & RegEnumElement(l))
  45.   Next
  46.  
  47.  Case 2'files
  48.  
  49.   i=RegEnumValues(sp2)
  50.   for l=1 to i
  51.    Call RegDeleteValue(sp2 & RegEnumElement(l))
  52.   Next
  53.  
  54.  Case 3'computers
  55.  
  56.   i=RegEnumValues(sp3)
  57.   for l=1 to i
  58.    Call RegDeleteValue(sp3 & RegEnumElement(l))
  59.   Next
  60.  
  61.  Case 4'Docs
  62.  
  63.   i=RegEnumValues(sp4)
  64.   for l=1 to i
  65.    Call RegDeleteValue(sp4 & RegEnumElement(l))
  66.   Next
  67.  
  68.  Case 5'CLEAR ALL
  69.   bShowMessage=false
  70.   Call Plugin_Apply(1,0)
  71.   Call Plugin_Apply(2,0)
  72.   Call Plugin_Apply(3,0)
  73.   Call Plugin_Apply(4,0)   
  74.   bShowMessage=true
  75.  
  76.  end Select
  77.  
  78.  
  79.  if bShowMessage=true then 
  80.     Call MsgInformation("Cleared, please restart your PC so the changes can take effect.") 
  81.     Call Restart
  82.  end if
  83. End Sub
  84.  
  85. 'Called when the Plugin is about to be removed from memory
  86. Sub Plugin_Terminate
  87. End Sub
  88.